exports.addChecked = (pageList, checkedItem) => {
  const newPageList = [];
  if (pageList) {
    pageList.data.forEach((item, index) => {
      if (item.asMutable) {
        newPageList.push(item.asMutable());
      } else {
        item.checked = false;
        newPageList.push(item);
      }
    });
    newPageList.forEach((item, index) => {
      if (checkedItem._id === item._id) {
        newPageList[index].checked = true;
      } else {
        newPageList[index].checked = false;
      }
    });
  }
  return newPageList;
};
